cellrendererpix: make sure to select the default helper as a fallback
authorCosimo Cecchi <cosimoc@gnome.org>
Wed, 30 Nov 2011 16:27:24 +0000 (11:27 -0500)
committerCosimo Cecchi <cosimoc@gnome.org>
Wed, 30 Nov 2011 21:39:59 +0000 (16:39 -0500)
If we don't have expander pixbufs, select the default helper to render
the icon, even if the cell is an expander. This mimics what the old code
did.

gtk/gtkcellrendererpixbuf.c

index 893e1633325804fd77f351aca3bfb232806f4a73..25820b3ac80634acbf17b8954ac2cc739344a175 100644 (file)
@@ -531,18 +531,14 @@ gtk_cell_renderer_pixbuf_render (GtkCellRenderer      *cell,
           _gtk_icon_helper_set_pixbuf (icon_helper, priv->pixbuf_expander_closed);
         }
     }
-  else
-    {
-      icon_helper = g_object_ref (priv->icon_helper);
-    }
 
-  if (icon_helper != NULL)
-    {
-      _gtk_icon_helper_draw (icon_helper,
-                             context, cr,
-                             pix_rect.x, pix_rect.y);
-      g_object_unref (icon_helper);
-    }
+  if (icon_helper == NULL)
+    icon_helper = g_object_ref (priv->icon_helper);
+
+  _gtk_icon_helper_draw (icon_helper,
+                         context, cr,
+                         pix_rect.x, pix_rect.y);
+  g_object_unref (icon_helper);
 
   gtk_style_context_restore (context);
 }